package com.group.Service.Impl;

import com.group.DAO.HouseDAO;
import com.group.Enity.House;
import com.group.Service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {

    @Autowired
    private HouseDAO houseDAO;

    @Override
    public List<House> getHouses(String numbers) {
        return houseDAO.getHouses(numbers);
    }

    @Override
    public void add(House house) {
        houseDAO.add(house);
    }

    @Override
    public void addByInfor(Double area, String numbers, int buildingId, String date, String remarks) {
        houseDAO.addByInfor(area,numbers,buildingId,date,remarks);
    }

    @Override
    public void update(House house) {
        houseDAO.update(house);
    }

    @Override
    public void delete(int id) {
        houseDAO.delete(id);
    }
}
